<style>
    *{
        padding: 0;
        margin: 0;
    }
    input{
        width: 200px;
        border: solid 1px #8d8d8d;
        outline: none;
        padding: 10px;
        margin: auto;
        box-sizing: border-box;
    }
    ul{
        list-style: none;
        width: 200px;
        padding-top: 20px;
    }
    ul li{
        border: solid 1px #ddd;
        padding: 10px;
        margin-bottom: -1px;
    }
    ul li:nth-of-type(odd){
        background: #00b894;
    }
</style>
<body>
    <input type="text">
    <ul></ul>
</body>
<script>
    let obj = {
        words: new Set(),
        set keyword(word){
            this.words.add(word);
        },
        get keyword(){

        },
        show(){
            let ul = document.querySelector('ul');
            ul.innerHTML = '';
            this.words.forEach((item)=>{
                ul.innerHTML += (`<li> ${item} </li>`);
            })
        }
    };
    document.querySelector('input').addEventListener('blur',function(){
        console.log(this.value);
        obj.keyword = this.value;
        obj.show();
    })

</script>